home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / rayshade / Doc / Guide / lights.tex < prev    next >
LaTeX Document  |  1994-08-02  |  8.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 4c 69 67 68 74 20 53 |\chapter|{Light S|
|00000010| 6f 75 72 63 65 73 7d 0a | 0a 54 68 65 20 6c 69 67 |ources}.|.The lig|
|00000020| 68 74 69 6e 67 20 69 6e | 20 61 20 73 63 65 6e 65 |hting in| a scene|
|00000030| 20 69 73 20 64 65 74 65 | 72 6d 69 6e 65 64 20 62 | is dete|rmined b|
|00000040| 79 20 74 68 65 20 6e 75 | 6d 62 65 72 2c 20 74 79 |y the nu|mber, ty|
|00000050| 70 65 2c 20 61 6e 64 20 | 6e 61 74 75 72 65 0a 6f |pe, and |nature.o|
|00000060| 66 20 74 68 65 20 6c 69 | 67 68 74 20 73 6f 75 72 |f the li|ght sour|
|00000070| 63 65 73 20 64 65 66 69 | 6e 65 64 20 69 6e 20 74 |ces defi|ned in t|
|00000080| 68 65 20 69 6e 70 75 74 | 20 66 69 6c 65 2e 20 20 |he input| file. |
|00000090| 41 76 61 69 6c 61 62 6c | 65 20 6c 69 67 68 74 20 |Availabl|e light |
|000000a0| 73 6f 75 72 63 65 73 0a | 72 61 6e 67 65 20 66 72 |sources.|range fr|
|000000b0| 6f 6d 20 73 69 6d 70 6c | 65 20 64 69 72 65 63 74 |om simpl|e direct|
|000000c0| 69 6f 6e 61 6c 20 73 6f | 75 72 63 65 73 20 74 6f |ional so|urces to|
|000000d0| 20 6d 6f 72 65 20 72 65 | 61 6c 69 73 74 69 63 20 | more re|alistic |
|000000e0| 62 75 74 20 63 6f 6d 70 | 75 74 61 74 69 6f 6e 61 |but comp|utationa|
|000000f0| 6c 6c 79 0a 63 6f 73 74 | 6c 79 20 71 75 61 64 72 |lly.cost|ly quadr|
|00000100| 69 6c 61 74 65 72 61 6c | 20 61 72 65 61 20 6c 69 |ilateral| area li|
|00000110| 67 68 74 20 73 6f 75 72 | 63 65 73 2e 20 20 54 79 |ght sour|ces. Ty|
|00000120| 70 69 63 61 6c 6c 79 2c | 20 79 6f 75 20 77 69 6c |pically,| you wil|
|00000130| 6c 20 77 61 6e 74 20 74 | 6f 20 75 73 65 0a 70 6f |l want t|o use.po|
|00000140| 69 6e 74 20 6f 72 20 64 | 69 72 65 63 74 69 6f 6e |int or d|irection|
|00000150| 61 6c 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 73 |al light| sources|
|00000160| 20 77 68 69 6c 65 20 64 | 65 76 65 6c 6f 70 69 6e | while d|evelopin|
|00000170| 67 20 69 6d 61 67 65 73 | 2e 20 20 57 68 65 6e 0a |g images|. When.|
|00000180| 66 69 6e 61 6c 20 72 65 | 6e 64 65 72 69 6e 67 73 |final re|nderings|
|00000190| 20 61 72 65 20 6d 61 64 | 65 2c 20 74 68 65 73 65 | are mad|e, these|
|000001a0| 20 73 69 6d 70 6c 65 20 | 6c 69 67 68 74 20 73 6f | simple |light so|
|000001b0| 75 72 63 65 73 20 6d 61 | 79 20 62 65 20 72 65 70 |urces ma|y be rep|
|000001c0| 6c 61 63 65 64 20 62 79 | 0a 74 68 65 20 6d 6f 72 |laced by|.the mor|
|000001d0| 65 20 63 6f 6d 70 6c 65 | 78 20 6f 6e 65 73 2e 0a |e comple|x ones..|
|000001e0| 0a 4e 6f 20 6d 61 74 74 | 65 72 20 77 68 61 74 20 |.No matt|er what |
|000001f0| 6b 69 6e 64 20 6f 66 20 | 6c 69 67 68 74 20 73 6f |kind of |light so|
|00000200| 75 72 63 65 20 79 6f 75 | 20 75 73 65 2c 20 79 6f |urce you| use, yo|
|00000210| 75 20 77 69 6c 6c 20 6e | 65 65 64 20 74 6f 0a 73 |u will n|eed to.s|
|00000220| 70 65 63 69 66 79 20 69 | 74 73 20 69 6e 74 65 6e |pecify i|ts inten|
|00000230| 73 69 74 79 2e 0a 49 6e | 20 74 68 69 73 20 63 68 |sity..In| this ch|
|00000240| 61 70 74 65 72 2c 20 61 | 6e 20 7b 5c 65 6d 20 49 |apter, a|n {\em I|
|00000250| 6e 74 65 6e 73 69 74 79 | 5c 2f 7d 20 69 73 20 65 |ntensity|\/} is e|
|00000260| 69 74 68 65 72 20 61 20 | 72 65 64 2d 67 72 65 65 |ither a |red-gree|
|00000270| 6e 2d 62 6c 75 65 20 74 | 72 69 70 6c 65 0a 69 6e |n-blue t|riple.in|
|00000280| 64 69 63 61 74 69 6e 67 | 20 74 68 65 20 63 6f 6c |dicating| the col|
|00000290| 6f 72 20 6f 66 20 74 68 | 65 20 6c 69 67 68 74 20 |or of th|e light |
|000002a0| 73 6f 75 72 63 65 2c 20 | 6f 72 20 61 20 73 69 6e |source, |or a sin|
|000002b0| 67 6c 65 20 76 61 6c 75 | 65 20 74 68 61 74 20 69 |gle valu|e that i|
|000002c0| 73 0a 69 6e 74 65 72 70 | 72 65 74 65 64 20 61 73 |s.interp|reted as|
|000002d0| 20 74 68 65 20 69 6e 74 | 65 6e 73 69 74 79 20 6f | the int|ensity o|
|000002e0| 66 20 61 20 60 60 77 68 | 69 74 65 27 27 20 6c 69 |f a ``wh|ite'' li|
|000002f0| 67 68 74 2e 0a 49 6e 20 | 74 68 65 20 63 75 72 72 |ght..In |the curr|
|00000300| 65 6e 74 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 7b |ent vers|ion of {|
|00000310| 5c 72 61 79 73 68 61 64 | 65 7d 2c 20 74 68 65 20 |\rayshad|e}, the |
|00000320| 69 6e 74 65 6e 73 69 74 | 79 20 6f 66 20 61 20 6c |intensit|y of a l|
|00000330| 69 67 68 74 20 64 6f 65 | 73 0a 6e 6f 74 20 64 65 |ight doe|s.not de|
|00000340| 63 72 65 61 73 65 20 61 | 73 0a 6f 6e 65 20 6d 6f |crease a|s.one mo|
|00000350| 76 65 73 20 66 61 72 74 | 68 65 72 20 66 72 6f 6d |ves fart|her from|
|00000360| 20 69 74 2e 0a 0a 49 66 | 20 79 6f 75 20 64 6f 20 | it...If| you do |
|00000370| 6e 6f 74 20 64 65 66 69 | 6e 65 20 61 20 6c 69 67 |not defi|ne a lig|
|00000380| 68 74 20 73 6f 75 72 63 | 65 2c 20 7b 5c 72 61 79 |ht sourc|e, {\ray|
|00000390| 73 68 61 64 65 7d 20 77 | 69 6c 6c 20 63 72 65 61 |shade} w|ill crea|
|000003a0| 74 65 20 61 20 64 69 72 | 65 63 74 69 6f 6e 61 6c |te a dir|ectional|
|000003b0| 0a 6c 69 67 68 74 20 73 | 6f 75 72 63 65 20 6f 66 |.light s|ource of|
|000003c0| 20 69 6e 74 65 6e 73 69 | 74 79 20 31 2e 30 20 64 | intensi|ty 1.0 d|
|000003d0| 65 66 69 6e 65 64 20 62 | 79 20 74 68 65 20 76 65 |efined b|y the ve|
|000003e0| 63 74 6f 72 20 28 31 2e | 2c 20 2d 31 2e 2c 20 31 |ctor (1.|, -1., 1|
|000003f0| 2e 29 2e 0a 54 68 69 73 | 20 64 65 66 61 75 6c 74 |.)..This| default|
|00000400| 20 6c 69 67 68 74 20 73 | 6f 75 72 63 65 20 69 73 | light s|ource is|
|00000410| 20 64 65 73 69 67 6e 65 | 64 20 74 6f 20 77 6f 72 | designe|d to wor|
|00000420| 6b 20 77 65 6c 6c 20 77 | 68 65 6e 20 64 65 66 61 |k well w|hen defa|
|00000430| 75 6c 74 0a 76 69 65 77 | 69 6e 67 20 70 61 72 61 |ult.view|ing para|
|00000440| 6d 65 74 65 72 73 20 61 | 6e 64 20 73 75 72 66 61 |meters a|nd surfa|
|00000450| 63 65 20 76 61 6c 75 65 | 73 20 61 72 65 20 62 65 |ce value|s are be|
|00000460| 69 6e 67 20 75 73 65 64 | 2e 0a 0a 59 6f 75 20 6d |ing used|...You m|
|00000470| 61 79 20 64 65 66 69 6e | 65 20 61 6e 79 20 6e 75 |ay defin|e any nu|
|00000480| 6d 62 65 72 20 6f 66 20 | 6c 69 67 68 74 20 73 6f |mber of |light so|
|00000490| 75 72 63 65 73 2c 20 62 | 75 74 20 6b 65 65 70 20 |urces, b|ut keep |
|000004a0| 69 6e 20 6d 69 6e 64 20 | 74 68 61 74 0a 69 74 20 |in mind |that.it |
|000004b0| 77 69 6c 6c 20 72 65 71 | 75 69 72 65 20 6d 6f 72 |will req|uire mor|
|000004c0| 65 20 74 69 6d 65 20 74 | 6f 20 72 65 6e 64 65 72 |e time t|o render|
|000004d0| 20 69 6d 61 67 65 73 20 | 74 68 61 74 20 69 6e 63 | images |that inc|
|000004e0| 6c 75 64 65 20 6d 61 6e | 79 0a 6c 69 67 68 74 20 |lude man|y.light |
|000004f0| 73 6f 75 72 63 65 73 2e | 20 20 49 74 20 73 68 6f |sources.| It sho|
|00000500| 75 6c 64 20 61 6c 73 6f | 20 62 65 20 6e 6f 74 65 |uld also| be note|
|00000510| 64 20 74 68 61 74 20 74 | 68 65 20 6c 69 67 68 74 |d that t|he light|
|00000520| 20 73 6f 75 72 63 65 73 | 20 74 68 65 6d 73 65 6c | sources| themsel|
|00000530| 76 65 73 0a 77 69 6c 6c | 20 6e 6f 74 20 61 70 70 |ves.will| not app|
|00000540| 65 61 72 20 69 6e 20 74 | 68 65 20 69 6d 61 67 65 |ear in t|he image|
|00000550| 2c 20 65 76 65 6e 20 69 | 66 20 74 68 65 79 20 61 |, even i|f they a|
|00000560| 72 65 20 70 6c 61 63 65 | 64 20 69 6e 20 66 72 61 |re place|d in fra|
|00000570| 6d 65 2e 0a 0a 5c 73 65 | 63 74 69 6f 6e 7b 4c 69 |me...\se|ction{Li|
|00000580| 67 68 74 20 53 6f 75 72 | 63 65 20 54 79 70 65 73 |ght Sour|ce Types|
|00000590| 7d 0a 0a 54 68 65 20 61 | 6d 6f 75 6e 74 20 6f 66 |}..The a|mount of|
|000005a0| 20 61 6d 62 69 65 6e 74 | 20 6c 69 67 68 74 20 70 | ambient| light p|
|000005b0| 72 65 73 65 6e 74 20 69 | 6e 20 61 20 73 63 65 6e |resent i|n a scen|
|000005c0| 65 20 69 73 20 63 6f 6e | 74 72 6f 6c 6c 65 64 20 |e is con|trolled |
|000005d0| 62 79 20 61 0a 70 73 65 | 75 64 6f 20 6c 69 67 68 |by a.pse|udo ligh|
|000005e0| 74 20 73 6f 75 72 63 65 | 20 6f 66 20 74 79 70 65 |t source| of type|
|000005f0| 20 7b 5c 65 6d 20 61 6d | 62 69 65 6e 74 7d 2e 0a | {\em am|bient}..|
|00000600| 0a 5c 62 65 67 69 6e 7b | 64 65 66 6b 65 79 7d 7b |.\begin{|defkey}{|
|00000610| 6c 69 67 68 74 7d 7b 7b | 5c 65 6d 20 49 6e 74 65 |light}{{|\em Inte|
|00000620| 6e 73 69 74 79 5c 2f 7d | 20 61 6d 62 69 65 6e 74 |nsity\/}| ambient|
|00000630| 7d 0a 09 44 65 66 69 6e | 65 20 74 68 65 20 61 6d |}..Defin|e the am|
|00000640| 6f 75 6e 74 20 6f 66 20 | 61 6d 62 69 65 6e 74 20 |ount of |ambient |
|00000650| 6c 69 67 68 74 20 70 72 | 65 73 65 6e 74 20 69 6e |light pr|esent in|
|00000660| 20 74 68 65 20 65 6e 74 | 69 72 65 0a 09 73 63 65 | the ent|ire..sce|
|00000670| 6e 65 2e 0a 5c 65 6e 64 | 7b 64 65 66 6b 65 79 7d |ne..\end|{defkey}|
|00000680| 0a 0a 54 68 65 72 65 20 | 69 73 20 6f 6e 6c 79 20 |..There |is only |
|00000690| 6f 6e 65 20 61 6d 62 69 | 65 6e 74 20 6c 69 67 68 |one ambi|ent ligh|
|000006a0| 74 20 73 6f 75 72 63 65 | 3b 20 69 74 73 20 64 65 |t source|; its de|
|000006b0| 66 61 75 6c 74 20 69 6e | 74 65 6e 73 69 74 79 20 |fault in|tensity |
|000006c0| 69 73 0a 7b 31 2c 20 31 | 2c 20 31 7d 2e 20 20 49 |is.{1, 1|, 1}. I|
|000006d0| 66 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |f more t|han one |
|000006e0| 61 6d 62 69 65 6e 74 20 | 6c 69 67 68 74 20 73 6f |ambient |light so|
|000006f0| 75 72 63 65 20 69 73 20 | 64 65 66 69 6e 65 64 2c |urce is |defined,|
|00000700| 0a 6f 6e 6c 79 20 74 68 | 65 20 6c 61 73 74 20 69 |.only th|e last i|
|00000710| 6e 73 74 61 6e 63 65 20 | 69 73 20 75 73 65 64 2e |nstance |is used.|
|00000720| 20 20 41 20 73 75 72 66 | 61 63 65 27 73 20 61 6d | A surf|ace's am|
|00000730| 62 69 65 6e 74 20 63 6f | 6c 6f 72 0a 69 73 20 6d |bient co|lor.is m|
|00000740| 75 6c 74 69 70 6c 69 65 | 64 20 62 79 20 74 68 65 |ultiplie|d by the|
|00000750| 20 69 6e 74 65 6e 73 69 | 74 79 20 6f 66 20 74 68 | intensi|ty of th|
|00000760| 65 20 61 6d 62 69 65 6e | 74 20 73 6f 75 72 63 65 |e ambien|t source|
|00000770| 20 74 6f 20 67 69 76 65 | 20 74 68 65 0a 74 6f 74 | to give| the.tot|
|00000780| 61 6c 20 61 6d 62 69 65 | 6e 74 20 6c 69 67 68 74 |al ambie|nt light|
|00000790| 20 72 65 66 6c 65 63 74 | 65 64 20 66 72 6f 6d 20 | reflect|ed from |
|000007a0| 74 68 65 20 73 75 72 66 | 61 63 65 2e 0a 0a 44 69 |the surf|ace...Di|
|000007b0| 72 65 63 74 69 6f 6e 61 | 6c 20 73 6f 75 72 63 65 |rectiona|l source|
|000007c0| 73 20 61 72 65 20 64 65 | 73 63 72 69 62 65 64 20 |s are de|scribed |
|000007d0| 62 79 20 61 20 64 69 72 | 65 63 74 69 6f 6e 20 61 |by a dir|ection a|
|000007e0| 6c 6f 6e 65 2c 20 61 6e | 64 20 61 72 65 20 75 73 |lone, an|d are us|
|000007f0| 65 66 75 6c 0a 66 6f 72 | 20 6d 6f 64 65 6c 69 6e |eful.for| modelin|
|00000800| 67 20 6c 69 67 68 74 20 | 73 6f 75 72 63 65 73 20 |g light |sources |
|00000810| 74 68 61 74 20 61 72 65 | 20 65 66 66 65 63 74 69 |that are| effecti|
|00000820| 76 65 6c 79 20 69 6e 66 | 69 6e 69 74 65 6c 79 20 |vely inf|initely |
|00000830| 66 61 72 20 61 77 61 79 | 0a 66 72 6f 6d 20 74 68 |far away|.from th|
|00000840| 65 20 6f 62 6a 65 63 74 | 73 20 74 68 65 79 20 69 |e object|s they i|
|00000850| 6c 6c 75 6d 69 6e 61 74 | 65 2e 20 20 20 0a 0a 5c |lluminat|e. ..\|
|00000860| 62 65 67 69 6e 7b 64 65 | 66 6b 65 79 7d 7b 6c 69 |begin{de|fkey}{li|
|00000870| 67 68 74 7d 7b 7b 5c 65 | 6d 20 49 6e 74 65 6e 73 |ght}{{\e|m Intens|
|00000880| 69 74 79 5c 2f 7d 20 7b | 5c 74 74 20 64 69 72 65 |ity\/} {|\tt dire|
|00000890| 63 74 69 6f 6e 61 6c 7d | 20 5c 65 76 65 63 7b 64 |ctional}| \evec{d|
|000008a0| 69 72 65 63 74 69 6f 6e | 7d 7d 0a 09 44 65 66 69 |irection|}}..Defi|
|000008b0| 6e 65 20 61 20 6c 69 67 | 68 74 20 73 6f 75 72 63 |ne a lig|ht sourc|
|000008c0| 65 20 77 69 74 68 20 74 | 68 65 20 67 69 76 65 6e |e with t|he given|
|000008d0| 20 69 6e 74 65 6e 73 69 | 74 79 20 74 68 61 74 20 | intensi|ty that |
|000008e0| 69 73 0a 09 64 65 66 69 | 6e 65 64 20 74 6f 20 62 |is..defi|ned to b|
|000008f0| 65 20 69 6e 20 74 68 65 | 20 67 69 76 65 6e 20 64 |e in the| given d|
|00000900| 69 72 65 63 74 69 6f 6e | 20 66 72 6f 6d 20 65 76 |irection| from ev|
|00000910| 65 72 79 20 70 6f 69 6e | 74 0a 09 69 74 20 69 6c |ery poin|t..it il|
|00000920| 6c 75 6d 69 6e 61 74 65 | 73 2e 20 20 54 68 65 20 |luminate|s. The |
|00000930| 64 69 72 65 63 74 69 6f | 6e 20 6e 65 65 64 20 6e |directio|n need n|
|00000940| 6f 74 20 62 65 20 6e 6f | 72 6d 61 6c 69 7a 65 64 |ot be no|rmalized|
|00000950| 2e 0a 5c 65 6e 64 7b 64 | 65 66 6b 65 79 7d 0a 0a |..\end{d|efkey}..|
|00000960| 50 6f 69 6e 74 20 73 6f | 75 72 63 65 73 20 61 72 |Point so|urces ar|
|00000970| 65 20 64 65 66 69 6e 65 | 64 20 61 73 20 61 20 73 |e define|d as a s|
|00000980| 69 6e 67 6c 65 20 70 6f | 69 6e 74 20 69 6e 20 73 |ingle po|int in s|
|00000990| 70 61 63 65 2e 20 20 54 | 68 65 79 20 70 72 6f 64 |pace. T|hey prod|
|000009a0| 75 63 65 0a 73 68 61 64 | 6f 77 73 20 77 69 74 68 |uce.shad|ows with|
|000009b0| 20 73 68 61 72 70 20 65 | 64 67 65 73 20 61 6e 64 | sharp e|dges and|
|000009c0| 20 61 72 65 20 61 20 67 | 6f 6f 64 20 72 65 70 6c | are a g|ood repl|
|000009d0| 61 63 65 6d 65 6e 74 20 | 66 6f 72 20 65 78 74 65 |acement |for exte|
|000009e0| 6e 64 65 64 0a 61 6e 64 | 20 6f 74 68 65 72 20 63 |nded.and| other c|
|000009f0| 6f 6d 70 75 74 61 74 69 | 6f 6e 61 6c 6c 79 20 65 |omputati|onally e|
|00000a00| 78 70 65 6e 73 69 76 65 | 20 6c 69 67 68 74 20 73 |xpensive| light s|
|00000a10| 6f 75 72 63 65 2e 0a 0a | 5c 62 65 67 69 6e 7b 64 |ource...|\begin{d|
|00000a20| 65 66 6b 65 79 7d 7b 6c | 69 67 68 74 7d 7b 7b 5c |efkey}{l|ight}{{\|
|00000a30| 65 6d 20 49 6e 74 65 6e | 73 69 74 79 5c 2f 7d 20 |em Inten|sity\/} |
|00000a40| 7b 5c 74 74 20 70 6f 69 | 6e 74 7d 20 5c 65 76 65 |{\tt poi|nt} \eve|
|00000a50| 63 7b 70 6f 73 7d 7d 0a | 09 50 6c 61 63 65 20 61 |c{pos}}.|.Place a|
|00000a60| 20 70 6f 69 6e 74 20 6c | 69 67 68 74 20 73 6f 75 | point l|ight sou|
|00000a70| 72 63 65 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |rce with| the giv|
|00000a80| 65 6e 20 69 6e 74 65 6e | 73 69 74 79 20 61 74 20 |en inten|sity at |
|00000a90| 74 68 65 0a 09 67 69 76 | 65 6e 20 70 6f 73 69 74 |the..giv|en posit|
|00000aa0| 69 6f 6e 2e 0a 5c 65 6e | 64 7b 64 65 66 6b 65 79 |ion..\en|d{defkey|
|00000ab0| 7d 0a 0a 53 70 6f 74 6c | 69 67 68 74 73 20 61 72 |}..Spotl|ights ar|
|00000ac0| 65 20 75 73 65 66 75 6c | 20 66 6f 72 20 63 72 65 |e useful| for cre|
|00000ad0| 61 74 69 6e 67 20 64 72 | 61 6d 61 74 69 63 20 6c |ating dr|amatic l|
|00000ae0| 6f 63 61 6c 69 7a 65 64 | 20 6c 69 67 68 74 69 6e |ocalized| lightin|
|00000af0| 67 20 65 66 66 65 63 74 | 73 2e 0a 54 68 65 79 20 |g effect|s..They |
|00000b00| 61 72 65 20 64 65 66 69 | 6e 65 64 20 62 79 20 74 |are defi|ned by t|
|00000b10| 68 65 69 72 20 70 6f 73 | 69 74 69 6f 6e 2c 20 74 |heir pos|ition, t|
|00000b20| 68 65 20 64 69 72 65 63 | 74 69 6f 6e 20 69 6e 20 |he direc|tion in |
|00000b30| 77 68 69 63 68 20 74 68 | 65 79 0a 61 72 65 20 70 |which th|ey.are p|
|00000b40| 6f 69 6e 74 69 6e 67 2c | 20 61 6e 64 20 74 68 65 |ointing,| and the|
|00000b50| 20 77 69 64 74 68 20 6f | 66 20 74 68 65 20 62 65 | width o|f the be|
|00000b60| 61 6d 20 6f 66 20 6c 69 | 67 68 74 20 74 68 65 79 |am of li|ght they|
|00000b70| 20 70 72 6f 64 75 63 65 | 2e 0a 0a 5c 62 65 67 69 | produce|...\begi|
|00000b80| 6e 7b 64 65 66 6b 65 79 | 7d 7b 6c 69 67 68 74 7d |n{defkey|}{light}|
|00000b90| 7b 7b 5c 65 6d 20 49 6e | 74 65 6e 73 69 74 79 5c |{{\em In|tensity\|
|00000ba0| 2f 7d 20 7b 5c 74 74 20 | 73 70 6f 74 7d 20 5c 65 |/} {\tt |spot} \e|
|00000bb0| 76 65 63 7b 70 6f 73 7d | 20 5c 65 76 65 63 7b 74 |vec{pos}| \evec{t|
|00000bc0| 6f 7d 0a 20 20 20 20 7b | 24 5c 61 6c 70 68 61 24 |o}. {|$\alpha$|
|00000bd0| 7d 20 5b 20 24 5c 74 68 | 65 74 61 5f 7b 69 6e 7d |} [ $\th|eta_{in}|
|00000be0| 24 20 24 5c 74 68 65 74 | 61 5f 7b 6f 75 74 7d 24 |$ $\thet|a_{out}$|
|00000bf0| 20 5d 7d 0a 09 50 6c 61 | 63 65 20 61 20 73 70 6f | ]}..Pla|ce a spo|
|00000c00| 74 6c 69 67 68 74 20 61 | 74 20 5c 65 76 65 63 7b |tlight a|t \evec{|
|00000c10| 70 6f 73 7d 2c 20 6f 72 | 69 65 6e 74 65 64 20 61 |pos}, or|iented a|
|00000c20| 73 20 74 6f 20 62 65 20 | 70 6f 69 6e 74 69 6e 67 |s to be |pointing|
|00000c30| 20 61 74 0a 09 5c 65 76 | 65 63 7b 74 6f 7d 2e 20 | at..\ev|ec{to}. |
|00000c40| 20 54 68 65 20 69 6e 74 | 65 6e 73 69 74 79 20 6f | The int|ensity o|
|00000c50| 66 20 74 68 65 20 6c 69 | 67 68 74 20 66 61 6c 6c |f the li|ght fall|
|00000c60| 73 20 6f 66 66 20 61 73 | 0a 09 24 28 63 6f 73 69 |s off as|..$(cosi|
|00000c70| 6e 65 20 5c 74 68 65 74 | 61 29 5e 7b 5c 61 6c 70 |ne \thet|a)^{\alp|
|00000c80| 68 61 7d 24 2c 20 77 68 | 65 72 65 20 24 5c 74 68 |ha}$, wh|ere $\th|
|00000c90| 65 74 61 24 20 69 73 20 | 74 68 65 20 61 6e 67 6c |eta$ is |the angl|
|00000ca0| 65 20 62 65 74 77 65 65 | 6e 20 74 68 65 0a 09 73 |e betwee|n the..s|
|00000cb0| 70 6f 74 6c 69 67 68 74 | 27 73 20 6d 61 69 6e 20 |potlight|'s main |
|00000cc0| 61 78 69 73 20 61 6e 64 | 20 74 68 65 20 76 65 63 |axis and| the vec|
|00000cd0| 74 6f 72 20 66 72 6f 6d | 20 74 68 65 20 73 70 6f |tor from| the spo|
|00000ce0| 74 6c 69 67 68 74 20 74 | 6f 20 74 68 65 0a 09 70 |tlight t|o the..p|
|00000cf0| 6f 69 6e 74 20 62 65 69 | 6e 67 20 69 6c 6c 75 6d |oint bei|ng illum|
|00000d00| 69 6e 61 74 65 64 2e 20 | 20 24 5c 74 68 65 74 61 |inated. | $\theta|
|00000d10| 5f 7b 69 6e 7d 24 20 61 | 6e 64 0a 09 24 5c 74 68 |_{in}$ a|nd..$\th|
|00000d20| 65 74 61 5f 7b 6f 75 74 | 7d 24 20 6d 61 79 20 62 |eta_{out|}$ may b|
|00000d30| 65 20 75 73 65 64 20 74 | 6f 20 63 6f 6e 74 72 6f |e used t|o contro|
|00000d40| 6c 20 74 68 65 20 72 61 | 64 69 75 73 20 6f 66 20 |l the ra|dius of |
|00000d50| 74 68 65 20 63 6f 6e 65 | 20 6f 66 20 6c 69 67 68 |the cone| of ligh|
|00000d60| 74 0a 09 70 72 6f 64 75 | 63 65 64 20 62 79 20 74 |t..produ|ced by t|
|00000d70| 68 65 20 73 70 6f 74 6c | 69 67 68 74 2e 0a 5c 65 |he spotl|ight..\e|
|00000d80| 6e 64 7b 64 65 66 6b 65 | 79 7d 0a 24 5c 74 68 65 |nd{defke|y}.$\the|
|00000d90| 74 61 5f 7b 69 6e 7d 24 | 20 69 73 20 74 68 65 20 |ta_{in}$| is the |
|00000da0| 74 68 65 20 61 6e 67 6c | 65 20 61 74 20 77 68 69 |the angl|e at whi|
|00000db0| 63 68 0a 74 68 65 20 6c | 69 67 68 74 20 73 6f 75 |ch.the l|ight sou|
|00000dc0| 72 63 65 20 62 65 67 69 | 6e 73 20 74 6f 20 62 65 |rce begi|ns to be|
|00000dd0| 20 61 74 74 65 6e 75 61 | 74 65 64 2e 20 20 41 74 | attenua|ted. At|
|00000de0| 20 24 5c 74 68 65 74 61 | 5f 7b 6f 75 74 7d 24 2c | $\theta|_{out}$,|
|00000df0| 0a 74 68 65 20 73 70 6f | 74 6c 69 67 68 74 20 69 |.the spo|tlight i|
|00000e00| 6e 74 65 6e 73 69 74 79 | 20 69 73 20 7a 65 72 6f |ntensity| is zero|
|00000e10| 2e 0a 54 68 69 73 20 61 | 66 66 6f 72 64 73 20 63 |..This a|ffords c|
|00000e20| 6f 6e 74 72 6f 6c 0a 6f | 76 65 72 20 68 6f 77 20 |ontrol.o|ver how |
|00000e30| 60 60 66 75 7a 7a 79 27 | 27 20 74 68 65 20 65 64 |``fuzzy'|' the ed|
|00000e40| 67 65 73 20 6f 66 20 74 | 68 65 20 73 70 6f 74 6c |ges of t|he spotl|
|00000e50| 69 67 68 74 20 61 72 65 | 2e 20 20 49 66 20 6e 65 |ight are|. If ne|
|00000e60| 69 74 68 65 72 20 61 6e | 67 6c 65 0a 69 73 20 67 |ither an|gle.is g|
|00000e70| 69 76 65 6e 2c 20 74 68 | 65 79 20 62 6f 74 68 20 |iven, th|ey both |
|00000e80| 61 72 65 20 65 66 66 65 | 63 74 69 76 65 6c 79 20 |are effe|ctively |
|00000e90| 73 65 74 20 74 6f 20 31 | 38 30 20 64 65 67 72 65 |set to 1|80 degre|
|00000ea0| 65 73 2e 0a 0a 45 78 74 | 65 6e 64 65 64 20 73 6f |es...Ext|ended so|
|00000eb0| 75 72 63 65 73 20 61 72 | 65 20 6d 65 61 6e 74 20 |urces ar|e meant |
|00000ec0| 74 6f 20 6d 6f 64 65 6c | 20 73 70 68 65 72 69 63 |to model| spheric|
|00000ed0| 61 6c 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 73 |al light| sources|
|00000ee0| 2e 20 20 55 6e 6c 69 6b | 65 0a 70 6f 69 6e 74 20 |. Unlik|e.point |
|00000ef0| 73 6f 75 72 63 65 73 2c | 20 65 78 74 65 6e 64 65 |sources,| extende|
|00000f00| 64 20 73 6f 75 72 63 65 | 73 20 61 63 74 75 61 6c |d source|s actual|
|00000f10| 6c 79 20 70 6f 73 73 65 | 73 73 20 61 20 72 61 64 |ly posse|ss a rad|
|00000f20| 69 75 73 2c 20 61 6e 64 | 20 61 73 20 73 75 63 68 |ius, and| as such|
|00000f30| 0a 61 72 65 20 63 61 70 | 61 62 6c 65 20 6f 72 20 |.are cap|able or |
|00000f40| 70 72 6f 64 75 63 69 6e | 67 20 73 68 61 64 6f 77 |producin|g shadow|
|00000f50| 73 20 77 69 74 68 20 66 | 75 7a 7a 79 20 65 64 67 |s with f|uzzy edg|
|00000f60| 65 73 20 28 7b 5c 65 6d | 20 70 65 6e 75 6d 62 72 |es ({\em| penumbr|
|00000f70| 61 65 7d 29 2e 20 20 49 | 66 0a 79 6f 75 20 64 6f |ae}). I|f.you do|
|00000f80| 20 6e 6f 74 20 73 70 65 | 63 69 66 69 63 61 6c 6c | not spe|cificall|
|00000f90| 79 20 64 65 73 69 72 65 | 20 70 65 6e 75 6d 62 72 |y desire| penumbr|
|00000fa0| 61 65 20 69 6e 20 79 6f | 75 72 20 69 6d 61 67 65 |ae in yo|ur image|
|00000fb0| 2c 20 75 73 65 20 61 20 | 70 6f 69 6e 74 0a 73 6f |, use a |point.so|
|00000fc0| 75 72 63 65 20 69 6e 73 | 74 65 61 64 2e 0a 0a 5c |urce ins|tead...\|
|00000fd0| 62 65 67 69 6e 7b 64 65 | 66 6b 65 79 7d 7b 6c 69 |begin{de|fkey}{li|
|00000fe0| 67 68 74 7d 7b 7b 5c 65 | 6d 20 49 6e 74 65 6e 73 |ght}{{\e|m Intens|
|00000ff0| 69 74 79 5c 2f 7d 20 7b | 5c 74 74 20 65 78 74 65 |ity\/} {|\tt exte|
|00001000| 6e 64 65 64 7d 20 7b 5c | 65 6d 20 72 61 64 69 75 |nded} {\|em radiu|
|00001010| 73 7d 20 5c 65 76 65 63 | 7b 70 6f 73 7d 20 7d 0a |s} \evec|{pos} }.|
|00001020| 09 43 72 65 61 74 65 20 | 61 6e 20 65 78 74 65 6e |.Create |an exten|
|00001030| 64 65 64 20 6c 69 67 68 | 74 20 73 6f 75 72 63 65 |ded ligh|t source|
|00001040| 20 61 74 20 74 68 65 20 | 67 69 76 65 6e 20 70 6f | at the |given po|
|00001050| 73 69 74 69 6f 6e 20 61 | 6e 64 20 77 69 74 68 0a |sition a|nd with.|
|00001060| 09 74 68 65 20 67 69 76 | 65 6e 20 7b 5c 65 6d 20 |.the giv|en {\em |
|00001070| 72 61 64 69 75 73 7d 2e | 0a 5c 65 6e 64 7b 64 65 |radius}.|.\end{de|
|00001080| 66 6b 65 79 7d 0a 54 68 | 65 20 73 68 61 64 6f 77 |fkey}.Th|e shadow|
|00001090| 73 20 63 61 73 74 20 62 | 79 0a 65 78 74 65 6e 64 |s cast b|y.extend|
|000010a0| 65 64 20 73 6f 75 72 63 | 65 73 20 61 72 65 20 6d |ed sourc|es are m|
|000010b0| 6f 64 65 6c 65 64 20 62 | 79 20 74 61 6b 69 6e 67 |odeled b|y taking|
|000010c0| 20 73 61 6d 70 6c 65 73 | 20 6f 66 20 74 68 65 20 | samples| of the |
|000010d0| 73 6f 75 72 63 65 20 61 | 74 0a 64 69 66 66 65 72 |source a|t.differ|
|000010e0| 65 6e 74 20 6c 6f 63 61 | 74 69 6f 6e 73 20 6f 6e |ent loca|tions on|
|000010f0| 20 69 74 73 20 73 75 72 | 66 61 63 65 2e 20 20 57 | its sur|face. W|
|00001100| 68 65 6e 20 74 68 65 20 | 73 6f 75 72 63 65 20 69 |hen the |source i|
|00001110| 73 20 70 61 72 74 69 61 | 6c 6c 79 0a 68 69 64 64 |s partia|lly.hidd|
|00001120| 65 6e 20 66 72 6f 6d 20 | 61 20 67 69 76 65 6e 20 |en from |a given |
|00001130| 70 6f 69 6e 74 20 69 6e | 20 73 70 61 63 65 2c 20 |point in| space, |
|00001140| 74 68 61 74 20 70 6f 69 | 6e 74 20 69 73 20 69 6e |that poi|nt is in|
|00001150| 20 70 61 72 74 69 61 6c | 20 73 68 61 64 6f 77 0a | partial| shadow.|
|00001160| 77 69 74 68 20 72 65 73 | 70 65 63 74 20 74 6f 20 |with res|pect to |
|00001170| 74 68 65 20 65 78 74 65 | 6e 64 65 64 20 73 6f 75 |the exte|nded sou|
|00001180| 72 63 65 2c 20 61 6e 64 | 20 74 68 65 20 73 61 6d |rce, and| the sam|
|00001190| 70 6c 69 6e 67 20 70 72 | 6f 63 65 73 73 20 69 73 |pling pr|ocess is|
|000011a0| 0a 75 73 75 61 6c 6c 79 | 20 61 62 6c 65 20 74 6f |.usually| able to|
|000011b0| 20 64 65 74 65 72 6d 69 | 6e 65 20 74 68 69 73 20 | determi|ne this |
|000011c0| 66 61 63 74 2e 0a 0a 51 | 75 61 64 72 69 6c 61 74 |fact...Q|uadrilat|
|000011d0| 65 72 61 6c 20 6c 69 67 | 68 74 20 73 6f 75 72 63 |eral lig|ht sourc|
|000011e0| 65 73 20 61 72 65 20 63 | 6f 6d 70 75 74 61 74 69 |es are c|omputati|
|000011f0| 6f 6e 61 6c 6c 79 20 6d | 6f 72 65 20 65 78 70 65 |onally m|ore expe|
|00001200| 6e 73 69 76 65 20 74 68 | 61 6e 20 65 78 74 65 6e |nsive th|an exten|
|00001210| 64 65 64 0a 6c 69 67 68 | 74 20 73 6f 75 72 63 65 |ded.ligh|t source|
|00001220| 73 2c 20 62 75 74 20 61 | 72 65 20 6d 6f 72 65 20 |s, but a|re more |
|00001230| 66 6c 65 78 69 62 6c 65 | 20 61 6e 64 20 70 72 6f |flexible| and pro|
|00001240| 64 75 63 65 20 6d 6f 72 | 65 20 72 65 61 6c 69 73 |duce mor|e realis|
|00001250| 74 69 63 20 72 65 73 75 | 6c 74 73 2e 0a 54 68 69 |tic resu|lts..Thi|
|00001260| 73 20 69 73 20 64 75 65 | 20 74 6f 20 74 68 65 20 |s is due| to the |
|00001270| 66 61 63 74 20 74 68 61 | 74 20 61 6e 20 61 72 65 |fact tha|t an are|
|00001280| 61 20 73 6f 75 72 63 65 | 20 69 73 20 61 70 70 72 |a source| is appr|
|00001290| 6f 78 69 6d 61 74 65 64 | 20 62 79 20 61 0a 6e 75 |oximated| by a.nu|
|000012a0| 6d 62 65 72 20 6f 66 20 | 70 6f 69 6e 74 20 73 6f |mber of |point so|
|000012b0| 75 72 63 65 73 20 77 68 | 6f 73 65 20 70 6f 73 69 |urces wh|ose posi|
|000012c0| 74 69 6f 6e 73 20 61 72 | 65 20 6a 69 74 74 65 72 |tions ar|e jitter|
|000012d0| 65 64 20 74 6f 20 72 65 | 64 75 63 65 20 61 6c 69 |ed to re|duce ali|
|000012e0| 61 73 69 6e 67 2e 0a 42 | 65 63 61 75 73 65 20 65 |asing..B|ecause e|
|000012f0| 61 63 68 20 6f 66 20 74 | 68 65 73 65 20 70 6f 69 |ach of t|hese poi|
|00001300| 6e 74 20 73 6f 75 72 63 | 65 73 20 68 61 73 20 73 |nt sourc|es has s|
|00001310| 68 61 64 69 6e 67 20 63 | 61 6c 63 75 6c 61 74 69 |hading c|alculati|
|00001320| 6f 6e 73 20 70 65 72 66 | 6f 72 6d 65 64 0a 69 6e |ons perf|ormed.in|
|00001330| 64 69 76 69 64 75 61 6c | 6c 79 2c 20 61 72 65 61 |dividual|ly, area|
|00001340| 20 73 6f 75 72 63 65 73 | 20 6d 61 79 20 62 65 20 | sources| may be |
|00001350| 70 6c 61 63 65 64 20 72 | 65 6c 61 74 69 76 65 6c |placed r|elativel|
|00001360| 79 20 63 6c 6f 73 65 20 | 74 6f 20 74 68 65 0a 6f |y close |to the.o|
|00001370| 62 6a 65 63 74 73 20 69 | 74 20 69 6c 6c 75 6d 69 |bjects i|t illumi|
|00001380| 6e 61 74 65 73 2c 20 61 | 6e 64 20 61 20 72 65 61 |nates, a|nd a rea|
|00001390| 73 6f 6e 61 62 6c 65 20 | 69 6d 61 67 65 20 77 69 |sonable |image wi|
|000013a0| 6c 6c 20 72 65 73 75 6c | 74 2e 0a 0a 5c 62 65 67 |ll resul|t...\beg|
|000013b0| 69 6e 7b 64 65 66 6b 65 | 79 7d 7b 6c 69 67 68 74 |in{defke|y}{light|
|000013c0| 7d 7b 7b 5c 65 6d 20 49 | 6e 74 65 6e 73 69 74 79 |}{{\em I|ntensity|
|000013d0| 5c 2f 7d 20 7b 5c 74 74 | 20 61 72 65 61 7d 20 5c |\/} {\tt| area} \|
|000013e0| 65 76 65 63 7b 70 31 7d | 20 5c 65 76 65 63 7b 70 |evec{p1}| \evec{p|
|000013f0| 32 7d 20 7b 5c 65 6d 20 | 75 73 61 6d 70 7d 0a 09 |2} {\em |usamp}..|
|00001400| 5c 65 76 65 63 7b 70 33 | 7d 20 7b 5c 65 6d 20 76 |\evec{p3|} {\em v|
|00001410| 73 61 6d 70 7d 7d 0a 09 | 43 72 65 61 74 65 20 61 |samp}}..|Create a|
|00001420| 20 71 75 61 64 72 69 6c | 61 74 65 72 61 6c 20 61 | quadril|ateral a|
|00001430| 72 65 61 20 6c 69 67 68 | 74 20 73 6f 75 72 63 65 |rea ligh|t source|
|00001440| 2e 0a 09 54 68 65 20 24 | 75 24 20 61 78 69 73 0a |...The $|u$ axis.|
|00001450| 09 69 73 20 64 65 66 69 | 6e 65 64 20 62 79 20 74 |.is defi|ned by t|
|00001460| 68 65 20 76 65 63 74 6f | 72 20 66 72 6f 6d 20 5c |he vecto|r from \|
|00001470| 65 76 65 63 7b 70 31 7d | 20 74 6f 20 5c 65 76 65 |evec{p1}| to \eve|
|00001480| 63 7b 70 32 7d 2e 20 20 | 41 6c 6f 6e 67 0a 09 74 |c{p2}. |Along..t|
|00001490| 68 69 73 20 61 78 69 73 | 20 61 20 74 6f 74 61 6c |his axis| a total|
|000014a0| 20 6f 66 20 7b 5c 65 6d | 20 75 73 61 6d 70 7d 20 | of {\em| usamp} |
|000014b0| 73 61 6d 70 6c 65 73 20 | 77 69 6c 6c 20 62 65 20 |samples |will be |
|000014c0| 74 61 6b 65 6e 2e 0a 09 | 54 68 65 20 24 76 24 20 |taken...|The $v$ |
|000014d0| 61 78 69 73 20 6f 66 20 | 74 68 65 20 6c 69 67 68 |axis of |the ligh|
|000014e0| 74 20 73 6f 75 72 63 65 | 20 69 73 20 64 65 66 69 |t source| is defi|
|000014f0| 6e 65 64 20 62 79 20 74 | 68 65 20 76 65 63 74 6f |ned by t|he vecto|
|00001500| 72 0a 09 66 72 6f 6d 20 | 5c 65 76 65 63 7b 70 31 |r..from |\evec{p1|
|00001510| 7d 20 74 6f 20 5c 65 76 | 65 63 7b 70 33 7d 2e 20 |} to \ev|ec{p3}. |
|00001520| 20 41 6c 6f 6e 67 20 74 | 68 69 73 20 61 78 69 73 | Along t|his axis|
|00001530| 20 61 20 74 6f 74 61 6c | 20 6f 66 0a 09 7b 5c 65 | a total| of..{\e|
|00001540| 6d 20 76 73 61 6d 70 7d | 20 73 61 6d 70 6c 65 73 |m vsamp}| samples|
|00001550| 20 77 69 6c 6c 20 62 65 | 20 74 61 6b 65 6e 2e 0a | will be| taken..|
|00001560| 5c 65 6e 64 7b 64 65 66 | 6b 65 79 7d 0a 54 68 65 |\end{def|key}.The|
|00001570| 20 76 61 6c 75 65 73 20 | 6f 66 20 7b 5c 65 6d 20 | values |of {\em |
|00001580| 75 73 61 6d 70 7d 20 61 | 6e 64 20 7b 5c 65 6d 20 |usamp} a|nd {\em |
|00001590| 76 73 61 6d 70 7d 20 61 | 72 65 20 75 73 75 61 6c |vsamp} a|re usual|
|000015a0| 6c 79 20 63 68 6f 73 65 | 6e 20 74 6f 20 62 65 0a |ly chose|n to be.|
|000015b0| 70 72 6f 70 6f 72 74 69 | 6f 6e 61 6c 20 74 6f 20 |proporti|onal to |
|000015c0| 74 68 65 20 6c 65 6e 67 | 74 68 73 20 6f 66 20 74 |the leng|ths of t|
|000015d0| 68 65 20 24 75 24 20 61 | 6e 64 20 24 76 24 20 61 |he $u$ a|nd $v$ a|
|000015e0| 78 65 73 2e 20 20 43 68 | 6f 6f 73 69 6e 67 20 61 |xes. Ch|oosing a|
|000015f0| 0a 72 65 6c 61 74 69 76 | 65 6c 79 20 68 69 67 68 |.relativ|ely high|
|00001600| 20 6e 75 6d 62 65 72 20 | 6f 66 20 73 61 6d 70 6c | number |of sampl|
|00001610| 65 73 20 77 69 6c 6c 20 | 72 65 73 75 6c 74 20 69 |es will |result i|
|00001620| 6e 20 61 20 67 6f 6f 64 | 20 61 70 70 72 6f 78 69 |n a good| approxi|
|00001630| 6d 61 74 69 6f 6e 0a 74 | 6f 20 61 20 60 60 72 65 |mation.t|o a ``re|
|00001640| 61 6c 27 27 20 71 75 61 | 64 72 69 6c 61 74 65 72 |al'' qua|drilater|
|00001650| 61 6c 20 73 6f 75 72 63 | 65 2e 20 20 48 6f 77 65 |al sourc|e. Howe|
|00001660| 76 65 72 2c 20 62 65 63 | 61 75 73 65 20 63 6f 6d |ver, bec|ause com|
|00001670| 70 6c 65 74 65 0a 6c 69 | 67 68 74 69 6e 67 20 63 |plete.li|ghting c|
|00001680| 61 6c 63 75 6c 61 74 69 | 6f 6e 73 20 61 72 65 20 |alculati|ons are |
|00001690| 70 65 72 66 6f 72 6d 65 | 64 20 66 6f 72 20 65 61 |performe|d for ea|
|000016a0| 63 68 20 73 61 6d 70 6c | 65 2c 0a 74 68 65 20 63 |ch sampl|e,.the c|
|000016b0| 6f 6d 70 75 74 61 74 69 | 6f 6e 61 6c 20 63 6f 73 |omputati|onal cos|
|000016c0| 74 20 69 73 20 64 69 72 | 65 63 74 6c 79 20 70 72 |t is dir|ectly pr|
|000016d0| 6f 70 6f 72 74 69 6f 6e | 61 6c 20 74 6f 20 74 68 |oportion|al to th|
|000016e0| 65 20 70 72 6f 64 75 63 | 74 0a 6f 66 20 7b 5c 65 |e produc|t.of {\e|
|000016f0| 6d 20 75 73 61 6d 70 7d | 20 61 6e 64 20 7b 5c 65 |m usamp}| and {\e|
|00001700| 6d 20 76 73 61 6d 70 7d | 2e 0a 0a 5c 73 65 63 74 |m vsamp}|...\sect|
|00001710| 69 6f 6e 7b 53 68 61 64 | 6f 77 73 7d 0a 0a 49 6e |ion{Shad|ows}..In|
|00001720| 20 6f 72 64 65 72 20 74 | 6f 20 64 65 74 65 72 6d | order t|o determ|
|00001730| 69 6e 65 20 74 68 65 20 | 63 6f 6c 6f 72 20 6f 66 |ine the |color of|
|00001740| 20 61 20 70 6f 69 6e 74 | 20 6f 6e 20 74 68 65 20 | a point| on the |
|00001750| 73 75 72 66 61 63 65 0a | 6f 66 20 61 6e 79 20 6f |surface.|of any o|
|00001760| 62 6a 65 63 74 2c 20 69 | 74 20 69 73 20 6e 65 63 |bject, i|t is nec|
|00001770| 65 73 73 61 72 79 0a 74 | 6f 20 64 65 74 65 72 6d |essary.t|o determ|
|00001780| 69 6e 65 20 69 66 20 74 | 68 61 74 20 70 6f 69 6e |ine if t|hat poin|
|00001790| 74 20 69 73 20 69 6e 20 | 73 68 61 64 6f 77 20 77 |t is in |shadow w|
|000017a0| 69 74 68 20 72 65 73 70 | 65 63 74 20 74 6f 20 65 |ith resp|ect to e|
|000017b0| 61 63 68 0a 64 65 66 69 | 6e 65 64 20 6c 69 67 68 |ach.defi|ned ligh|
|000017c0| 74 20 73 6f 75 72 63 65 | 2e 20 20 49 66 20 74 68 |t source|. If th|
|000017d0| 65 20 70 6f 69 6e 74 20 | 69 73 20 74 6f 74 61 6c |e point |is total|
|000017e0| 6c 79 20 69 6e 20 73 68 | 61 64 6f 77 20 77 69 74 |ly in sh|adow wit|
|000017f0| 68 20 72 65 73 70 65 63 | 74 20 74 6f 0a 61 20 6c |h respec|t to.a l|
|00001800| 69 67 68 74 20 73 6f 75 | 72 63 65 2c 20 74 68 65 |ight sou|rce, the|
|00001810| 6e 20 74 68 65 20 6c 69 | 67 68 74 20 73 6f 75 72 |n the li|ght sour|
|00001820| 63 65 20 6d 61 6b 65 73 | 20 6e 6f 20 63 6f 6e 74 |ce makes| no cont|
|00001830| 72 69 62 75 74 69 6f 6e | 20 74 6f 20 74 68 65 0a |ribution| to the.|
|00001840| 70 6f 69 6e 74 27 73 20 | 66 69 6e 61 6c 20 63 6f |point's |final co|
|00001850| 6c 6f 72 2e 0a 0a 54 68 | 69 73 20 73 68 61 64 6f |lor...Th|is shado|
|00001860| 77 69 6e 67 20 64 65 74 | 65 72 6d 69 6e 61 74 69 |wing det|erminati|
|00001870| 6f 6e 20 69 73 20 6d 61 | 64 65 20 62 79 20 74 72 |on is ma|de by tr|
|00001880| 61 63 69 6e 67 20 72 61 | 79 73 20 66 72 6f 6d 20 |acing ra|ys from |
|00001890| 74 68 65 20 70 6f 69 6e | 74 0a 6f 66 20 69 6e 74 |the poin|t.of int|
|000018a0| 65 72 73 65 63 74 69 6f | 6e 20 74 6f 20 65 61 63 |ersectio|n to eac|
|000018b0| 68 20 6c 69 67 68 74 20 | 73 6f 75 72 63 65 2e 20 |h light |source. |
|000018c0| 20 54 68 65 73 65 20 60 | 60 73 68 61 64 6f 77 20 | These `|`shadow |
|000018d0| 66 65 65 6c 65 72 27 27 | 20 72 61 79 73 0a 63 61 |feeler''| rays.ca|
|000018e0| 6e 20 61 64 64 20 73 75 | 62 73 74 61 6e 74 69 61 |n add su|bstantia|
|000018f0| 6c 6c 79 20 74 6f 20 74 | 68 65 20 6f 76 65 72 61 |lly to t|he overa|
|00001900| 6c 6c 20 72 65 6e 64 65 | 72 69 6e 67 20 74 69 6d |ll rende|ring tim|
|00001910| 65 2e 20 20 54 68 69 73 | 20 69 73 20 65 73 70 65 |e. This| is espe|
|00001920| 63 69 61 6c 6c 79 0a 74 | 72 75 65 20 69 66 20 65 |cially.t|rue if e|
|00001930| 78 74 65 6e 64 65 64 20 | 6f 72 20 61 72 65 61 20 |xtended |or area |
|00001940| 6c 69 67 68 74 20 73 6f | 75 72 63 65 73 20 61 72 |light so|urces ar|
|00001950| 65 20 75 73 65 64 2e 20 | 20 49 66 20 61 74 20 61 |e used. | If at a|
|00001960| 6e 79 20 70 6f 69 6e 74 | 20 79 6f 75 0a 77 69 73 |ny point| you.wis|
|00001970| 68 20 74 6f 20 64 69 73 | 61 62 6c 65 20 73 68 61 |h to dis|able sha|
|00001980| 64 6f 77 20 64 65 74 65 | 72 6d 69 6e 61 74 69 6f |dow dete|rminatio|
|00001990| 6e 20 6f 6e 20 61 20 67 | 6c 6f 62 61 6c 20 73 63 |n on a g|lobal sc|
|000019a0| 61 6c 65 2c 20 74 68 65 | 72 65 20 69 73 0a 61 20 |ale, the|re is.a |
|000019b0| 63 6f 6d 6d 61 6e 64 2d | 6c 69 6e 65 20 6f 70 74 |command-|line opt|
|000019c0| 69 6f 6e 20 28 7b 5c 74 | 74 20 2d 6e 7d 29 20 74 |ion ({\t|t -n}) t|
|000019d0| 68 61 74 20 61 6c 6c 6f | 77 73 20 79 6f 75 20 74 |hat allo|ws you t|
|000019e0| 6f 20 64 6f 20 73 6f 2e | 20 20 49 74 20 69 73 20 |o do so.| It is |
|000019f0| 61 6c 73 6f 0a 70 6f 73 | 73 69 62 6c 65 0a 74 6f |also.pos|sible.to|
|00001a00| 20 64 69 73 61 62 6c 65 | 20 74 68 65 20 63 61 73 | disable| the cas|
|00001a10| 74 69 6e 67 20 6f 66 20 | 73 68 61 64 6f 77 73 20 |ting of |shadows |
|00001a20| 6f 6e 74 6f 20 67 69 76 | 65 6e 20 6f 62 6a 65 63 |onto giv|en objec|
|00001a30| 74 73 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 75 |ts throu|gh the u|
|00001a40| 73 65 0a 6f 66 20 74 68 | 65 20 7b 5c 74 74 20 6e |se.of th|e {\tt n|
|00001a50| 6f 73 68 61 64 6f 77 7d | 20 6b 65 79 77 6f 72 64 |oshadow}| keyword|
|00001a60| 20 69 6e 20 73 75 72 66 | 61 63 65 20 64 65 73 63 | in surf|ace desc|
|00001a70| 72 69 70 74 69 6f 6e 73 | 2e 20 20 49 6e 20 61 64 |riptions|. In ad|
|00001a80| 64 69 74 69 6f 6e 2c 0a | 74 68 65 20 7b 5c 74 74 |dition,.|the {\tt|
|00001a90| 20 6e 6f 73 68 61 64 6f | 77 7d 20 6b 65 79 77 6f | noshado|w} keywo|
|00001aa0| 72 64 20 6d 61 79 20 62 | 65 20 67 69 76 65 6e 20 |rd may b|e given |
|00001ab0| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 68 65 20 64 65 |followin|g the de|
|00001ac0| 66 69 6e 69 74 69 6f 6e | 0a 6f 66 20 61 20 6c 69 |finition|.of a li|
|00001ad0| 67 68 74 20 73 6f 75 72 | 63 65 2c 20 63 61 75 73 |ght sour|ce, caus|
|00001ae0| 69 6e 67 20 74 68 65 20 | 6c 69 67 68 74 20 73 6f |ing the |light so|
|00001af0| 75 72 63 65 20 74 6f 20 | 63 61 73 74 20 6e 6f 20 |urce to |cast no |
|00001b00| 73 68 61 64 6f 77 73 20 | 6f 6e 74 6f 0a 61 6e 79 |shadows |onto.any|
|00001b10| 20 73 75 72 66 61 63 65 | 2e 0a 0a 44 65 74 65 72 | surface|...Deter|
|00001b20| 6d 69 6e 69 6e 67 20 69 | 66 20 61 20 70 6f 69 6e |mining i|f a poin|
|00001b30| 74 20 69 73 20 69 6e 20 | 73 68 61 64 6f 77 20 77 |t is in |shadow w|
|00001b40| 69 74 68 20 72 65 73 70 | 65 63 74 20 74 6f 20 61 |ith resp|ect to a|
|00001b50| 20 6c 69 67 68 74 20 73 | 6f 75 72 63 65 0a 69 73 | light s|ource.is|
|00001b60| 20 72 65 6c 61 74 69 76 | 65 6c 79 20 73 69 6d 70 | relativ|ely simp|
|00001b70| 6c 65 20 69 66 20 61 6c | 6c 20 74 68 65 20 6f 62 |le if al|l the ob|
|00001b80| 6a 65 63 74 73 20 69 6e | 20 61 20 73 63 65 6e 65 |jects in| a scene|
|00001b90| 20 61 72 65 20 6f 70 61 | 71 75 65 2e 20 20 49 6e | are opa|que. In|
|00001ba0| 0a 74 68 69 73 20 63 61 | 73 65 2c 20 6f 6e 65 20 |.this ca|se, one |
|00001bb0| 73 69 6d 70 6c 79 20 74 | 72 61 63 65 73 20 61 20 |simply t|races a |
|00001bc0| 72 61 79 20 66 72 6f 6d | 20 74 68 65 20 70 6f 69 |ray from| the poi|
|00001bd0| 6e 74 20 74 6f 20 74 68 | 65 20 6c 69 67 68 74 20 |nt to th|e light |
|00001be0| 73 6f 75 72 63 65 2e 0a | 49 66 20 74 68 65 20 72 |source..|If the r|
|00001bf0| 61 79 20 68 69 74 73 20 | 61 6e 20 6f 62 6a 65 63 |ay hits |an objec|
|00001c00| 74 20 62 65 66 6f 72 65 | 20 69 74 20 72 65 61 63 |t before| it reac|
|00001c10| 68 65 73 20 74 68 65 20 | 6c 69 67 68 74 20 73 6f |hes the |light so|
|00001c20| 75 72 63 65 2c 20 74 68 | 65 6e 0a 74 68 65 20 70 |urce, th|en.the p|
|00001c30| 6f 69 6e 74 20 69 73 20 | 69 6e 20 73 68 61 64 6f |oint is |in shado|
|00001c40| 77 2e 0a 0a 53 68 61 64 | 6f 77 20 64 65 74 65 72 |w...Shad|ow deter|
|00001c50| 6d 69 6e 61 74 69 6f 6e | 0a 62 65 63 6f 6d 65 73 |mination|.becomes|
|00001c60| 20 6d 6f 72 65 20 63 6f | 6d 70 6c 69 63 61 74 65 | more co|mplicate|
|00001c70| 64 20 69 66 20 74 68 65 | 72 65 20 61 72 65 20 6f |d if the|re are o|
|00001c80| 6e 65 20 6f 72 20 6d 6f | 72 65 20 6f 62 6a 65 63 |ne or mo|re objec|
|00001c90| 74 73 20 77 69 74 68 0a | 6e 6f 6e 2d 7a 65 72 6f |ts with.|non-zero|
|00001ca0| 20 74 72 61 6e 73 70 61 | 72 65 6e 63 79 20 62 65 | transpa|rency be|
|00001cb0| 74 77 65 65 6e 20 74 68 | 65 20 70 6f 69 6e 74 20 |tween th|e point |
|00001cc0| 61 6e 64 20 74 68 65 20 | 6c 69 67 68 74 20 73 6f |and the |light so|
|00001cd0| 75 72 63 65 2e 0a 54 72 | 61 6e 73 70 61 72 65 6e |urce..Tr|ansparen|
|00001ce0| 74 20 6f 62 6a 65 63 74 | 73 20 6d 61 79 20 6e 6f |t object|s may no|
|00001cf0| 74 20 63 6f 6d 70 6c 65 | 74 65 6c 79 20 62 6c 6f |t comple|tely blo|
|00001d00| 63 6b 20 74 68 65 20 6c | 69 67 68 74 20 66 72 6f |ck the l|ight fro|
|00001d10| 6d 20 61 20 73 6f 75 72 | 63 65 2c 0a 62 75 74 20 |m a sour|ce,.but |
|00001d20| 6d 65 72 65 6c 79 20 61 | 74 74 65 6e 75 61 74 65 |merely a|ttenuate|
|00001d30| 20 69 74 2e 20 49 6e 20 | 73 75 63 68 20 63 61 73 | it. In |such cas|
|00001d40| 65 73 2c 20 69 74 20 69 | 73 20 6e 65 63 65 73 73 |es, it i|s necess|
|00001d50| 61 72 79 20 74 6f 20 63 | 6f 6d 70 75 74 65 20 74 |ary to c|ompute t|
|00001d60| 68 65 0a 61 6d 6f 75 6e | 74 20 6f 66 20 61 74 74 |he.amoun|t of att|
|00001d70| 65 6e 75 61 74 69 6f 6e | 20 61 74 20 65 61 63 68 |enuation| at each|
|00001d80| 20 69 6e 74 65 72 73 65 | 63 74 69 6f 6e 20 61 6e | interse|ction an|
|00001d90| 64 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 0a 74 68 |d to con|tinue.th|
|00001da0| 65 20 73 68 61 64 6f 77 | 20 72 61 79 20 75 6e 74 |e shadow| ray unt|
|00001db0| 69 6c 20 69 74 20 65 69 | 74 68 65 72 20 72 65 61 |il it ei|ther rea|
|00001dc0| 63 68 65 73 20 74 68 65 | 20 6c 69 67 68 74 20 73 |ches the| light s|
|00001dd0| 6f 75 72 63 65 20 6f 72 | 20 75 6e 74 69 6c 0a 74 |ource or| until.t|
|00001de0| 68 65 20 6c 69 67 68 74 | 20 69 73 20 63 6f 6d 70 |he light| is comp|
|00001df0| 6c 65 74 65 6c 79 20 61 | 74 74 65 6e 75 61 74 65 |letely a|ttenuate|
|00001e00| 64 2e 0a 0a 42 79 20 64 | 65 66 61 75 6c 74 2c 20 |d...By d|efault, |
|00001e10| 7b 5c 72 61 79 73 68 61 | 64 65 7d 20 63 6f 6d 70 |{\raysha|de} comp|
|00001e20| 75 74 65 73 20 73 68 61 | 64 6f 77 20 61 74 74 65 |utes sha|dow atte|
|00001e30| 6e 75 61 74 69 6f 6e 20 | 62 79 20 61 73 73 75 6d |nuation |by assum|
|00001e40| 69 6e 67 0a 74 68 61 74 | 20 74 68 65 20 69 6e 64 |ing.that| the ind|
|00001e50| 65 78 20 6f 66 20 72 65 | 66 72 61 63 74 69 6f 6e |ex of re|fraction|
|00001e60| 20 6f 66 20 74 68 65 20 | 74 72 61 6e 73 70 61 72 | of the |transpar|
|00001e70| 65 6e 74 20 6f 62 6a 65 | 63 74 20 69 73 20 74 68 |ent obje|ct is th|
|00001e80| 65 0a 73 61 6d 65 20 61 | 73 20 74 68 61 74 20 6f |e.same a|s that o|
|00001e90| 66 20 74 68 65 20 6d 65 | 64 69 75 6d 20 74 68 72 |f the me|dium thr|
|00001ea0| 6f 75 67 68 20 77 68 69 | 63 68 20 74 68 65 20 72 |ough whi|ch the r|
|00001eb0| 61 79 20 69 73 20 74 72 | 61 76 65 6c 69 6e 67 2e |ay is tr|aveling.|
|00001ec0| 0a 54 6f 20 64 69 73 61 | 62 6c 65 0a 70 61 72 74 |.To disa|ble.part|
|00001ed0| 69 61 6c 20 73 68 61 64 | 6f 77 69 6e 67 20 64 75 |ial shad|owing du|
|00001ee0| 65 20 74 6f 20 74 72 61 | 6e 73 70 61 72 65 6e 74 |e to tra|nsparent|
|00001ef0| 20 6f 62 6a 65 63 74 73 | 2c 20 74 68 65 20 7b 5c | objects|, the {\|
|00001f00| 74 74 20 73 68 61 64 6f | 77 74 72 61 6e 73 70 7d |tt shado|wtransp}|
|00001f10| 0a 6b 65 79 77 6f 72 64 | 20 73 68 6f 75 6c 64 20 |.keyword| should |
|00001f20| 62 65 20 67 69 76 65 6e | 20 73 6f 6d 65 77 68 65 |be given| somewhe|
|00001f30| 72 65 20 69 6e 20 74 68 | 65 20 69 6e 70 75 74 20 |re in th|e input |
|00001f40| 66 69 6c 65 2e 0a 0a 5c | 62 65 67 69 6e 7b 64 65 |file...\|begin{de|
|00001f50| 66 6b 65 79 7d 7b 73 68 | 61 64 6f 77 74 72 61 6e |fkey}{sh|adowtran|
|00001f60| 73 70 7d 7b 7d 0a 09 54 | 68 65 20 69 6e 74 65 6e |sp}{}..T|he inten|
|00001f70| 73 69 74 79 20 6f 66 20 | 6c 69 67 68 74 20 73 74 |sity of |light st|
|00001f80| 72 69 6b 69 6e 67 20 61 | 20 70 6f 69 6e 74 20 69 |riking a| point i|
|00001f90| 73 20 7b 5c 65 6d 20 6e | 6f 74 7d 20 61 66 66 65 |s {\em n|ot} affe|
|00001fa0| 63 74 65 64 20 62 79 0a | 09 69 6e 74 65 72 76 65 |cted by.|.interve|
|00001fb0| 6e 69 6e 67 20 74 72 61 | 6e 73 70 61 72 65 6e 74 |ning tra|nsparent|
|00001fc0| 20 6f 62 6a 65 63 74 73 | 2e 0a 5c 65 6e 64 7b 64 | objects|..\end{d|
|00001fd0| 65 66 6b 65 79 7d 0a 49 | 66 20 79 6f 75 20 65 6e |efkey}.I|f you en|
|00001fe0| 63 6c 6f 73 65 20 61 6e | 20 6f 62 6a 65 63 74 20 |close an| object |
|00001ff0| 62 65 68 69 6e 64 20 61 | 20 74 72 61 6e 73 70 61 |behind a| transpa|
|00002000| 72 65 6e 74 20 73 75 72 | 66 61 63 65 2c 20 61 6e |rent sur|face, an|
|00002010| 64 20 79 6f 75 20 77 69 | 73 68 0a 74 68 65 20 69 |d you wi|sh.the i|
|00002020| 6e 6e 65 72 20 6f 62 6a | 65 63 74 20 74 6f 20 62 |nner obj|ect to b|
|00002030| 65 20 69 6c 6c 75 6d 69 | 6e 61 74 65 64 2c 20 79 |e illumi|nated, y|
|00002040| 6f 75 20 6d 75 73 74 20 | 6e 6f 74 20 75 73 65 20 |ou must |not use |
|00002050| 74 68 65 20 7b 5c 74 74 | 20 73 68 61 64 6f 77 74 |the {\tt| shadowt|
|00002060| 72 61 6e 73 70 7d 0a 6b | 65 79 77 6f 72 64 20 6f |ransp}.k|eyword o|
|00002070| 72 20 74 68 65 20 7b 5c | 74 74 20 2d 6f 7d 20 6f |r the {\|tt -o} o|
|00002080| 70 74 69 6f 6e 2e 0a | |ption.. | |
+--------+-------------------------+-------------------------+--------+--------+